def letters(chars):
    chars_ed = ''
    for i in chars:
        if i.isalpha():
            chars_ed = chars_ed + i
    return chars_ed


def reverse(chars):
    chars_ed = ''
    for i in chars:
        chars_ed = i + chars_ed
    return chars_ed


def main():
    chars = input('请输入字符串：')
    print('先剔除非英文字母的字符再将字符串进行反转后的结果为：{}'.format(letters(reverse(chars))))


main()
